# cd jenkins workspace
cd $WORKSPACE

# build image
echo "starting build image..."
docker build -t op-user-server .

# stop and remove running container
echo "stop and remove running container..."
docker stop op-user-server
docker rm op-user-server

# start new instance container
echo "start new instance container..."
docker run -d -p 9000:9000 --name op-user-server op-user-server:latest
